<?php
/* 
* [***********************]
* @author: mazhenyu[houdunwangmzy@163.com]
* @Date:   2014-07-04 21:13:55
* @Last Modified time: 2014-07-04 21:49:37
*/
class HtmlTag{
	public $tag = array(
		'newpos'	=>	array('block' => 1),
		'newcompany'=>  array('block' => 1),
		'newresume'=>  array('block' => 1)
		);

	public function _newpos($attr, $content, $parse){

		$rows = isset($attr['rows']) ? $attr['rows'] : NULL;
		// p($rows);
		$str = <<<str
		<?php 
			\$posInfo = K('PosInfoView')->get_data('companyname,positionname,sendtime,cbid,cpid,logo',{$rows});
		?>
		<foreach from="\$posInfo" value="\$v">
		<?php
			
			\$v['comurl'] = U('Category/Company/show',array('cbid'=>\$v['cbid']));
			\$v['posurl'] = U('Category/Company/show',array('cbid'=>\$v['cbid'],'cpid'=>\$v['cpid']));
			\$v['time'] = date('y-m',\$v['sendtime']);
		?>
			{$content}
		</foreach>
str;
		return $str;
	}

	public function _newpos2($attr, $content, $parse){

		$rows = isset($attr['rows']) ? $attr['rows'] : NULL;
		$str = <<<str
		<?php 
			\$posInfo = K('PosInfoView')->get_data_all('companyname,positionname,sendtime,cbid,cpid,logo',{$rows});
		?>
		<foreach from="\$posInfo" value="\$v">
		<?php
			
			\$v['comurl'] = U('Category/Company/show',array('cbid'=>\$v['cbid']));
			\$v['posurl'] = U('Category/Company/show',array('cbid'=>\$v['cbid'],'cpid'=>\$v['cpid']));
			\$v['time'] = date('y-m',\$v['sendtime']);
		?>
			{$content}
		</foreach>
str;
		return $str;
	}

	public function _newresume($attr,$content,$parse)
	{
		$rows = isset($attr['rows']) ? $attr['rows'] : NULL;
		$str = <<<str
		<?php 
			\$resumeInfo = K('ResumeInfoView')->get_data('realname,sex,edu,reid',{$rows});
		?>
		<foreach from="\$resumeInfo" value="\$v">
		<?php
			
			\$v['resurl'] = U('Category/ResumeShow/show',array('reid'=>\$v['reid']));
			\$v['time'] = date('y-m',\$v['sendtime']);
		?>
			{$content}
		</foreach>	
str;
		return $str;
	}

}
?>
